home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
TRADRNGZ.TAS
< prev
next >
Wrap
Text File
|
1992-03-11
|
3KB
|
97 lines
TRADRNGZ.TAS
---------------------------------------------------------------------
{ Written by Jim Camenos, May 29, 1991,
Prodigy code VNGH10A looks at current trading
range over past 50 days + volume for break-outs..
Graphs price and volume. Price graph tells close,
high, % off high, avg daily hi-lo range, today's
hi-lo range, change today, and 30 day trading
range. Volume graph shows today's volume, avg
volume (50MA), % today vs 50MA; 5MA, and % 5MA
vs 50MA. Comparing the 5MA to the 50MA tries to
show how the recent volume trend compares with the
longer average. Data is displayed on the screen
during scanning.
Jim's original Trading.tas script looked for greater
than 2 times average volume, I loosened that to 1.5
times average volume..
Addition to Tom's fine work, I added a Buy / Sell
Oscillator.
-- Over 0 one might consider to be
long the stock, under 0 one might consider to be
flat. The Oscillator is made up of a 3/35 cross-
over and the moving average on the price chart is a
35da sma.}
#max_quotes 265
#OUTPUT_FILE 'TRADING.LST'
{#SCAN_DATE 920214}
if QUOTE_COUNT < 51 then RETURN; { Skip short stocks MM 6/5}
c35 : array;
c5 : array;
ct : array;
tx: array;
c35 = mov(c,35,'s');
c5 = mov(c,5,'s');
ct = sub(c5,c35);
tx=TR();
gosub true_range;
if first_ticker then
begin
writeln('Hi-Lo range today > 2X average & Volume today >',
' 1.5 times average.');
writeln(' Name Close Change AvgRg Today',
' %OH %30Rg Vol %V');
writeln(' ---- ----- ------ ----- -----',
' --- ----- --- --');
end;
goto wrtgrph
:wrtgrph
writeln(fullname,c[0],chg,avg_tr,tx[0],int(oh),'%'
,int(r30),'% ',v[0],int(v_v50),'%');
opengraph(3);
sizegraph(6,2,2);
graph(1,' '+format(c[0],'$%5.2f')+' is'
+format(oh,'%4.2f%')+' off '
+format(hivalqc[0],'$%5.2f')+' high. Change='
+format(chg,'$%2.2f')
+'. AvgRg= '+format(avg_tr,'$%1.2f')
+', Today= '+format(tx[0],'$%2.2f')
+'. 30 Day Range= '+format(r30,'%2.2f%'),c35);
drawline(15,0,hi30[-1],0,hi30[-1],-30,-1);
drawline(15,0,lo30[-1],0,lo30[-1],-30,-1);
graph(ct,'Buy / Sell Oscillator ** OVER = Long
/ UNDER = Short');
graph(v,'Today='+format(v[0],'%5.f')
+' 50MA='+format(v50[0],'%5.f')+' %Today='
+format(v_v50,'%4.f%')+' 5MA='
+format(v5,'%5.f')+','+format(v5_v50,'%4.f%')
+' of',v50,'50MA');
closegraph();
return;
:true_range
avg_tr = sum(tx,50)/50;
goto chkvol
return;
:chkvol
v50 : array;
v50 = mov(v,50,'s');
goto stats
return;
:stats
tr_sum = 1;
hivalqc : array;
hi30 : array;
lo30 : array;
qc=(quote_count - 2);
hi30 = hhv(c,30);
lo30 = llv(c,30);
hivalqc = hhv(c,qc);
r30 = (1-(lo30/hi30))*100;
oh = 100-((c/hivalqc)*100);
v5 = sum(v,5)/5;
v_v50 = ((v[0]/v50[0])*100);
v5_v50 = ((v5/v50[0])*100);
chg = c[0] - c[-1];
return;